﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DigitalImage.softLib.stages._2ColorToBinary {
    class CCTBotsu:IColorToBinary {
        public byte[,] transform(System.Drawing.Bitmap inputImage) {
            byte[,] slika = CImageUtil.bitmapToByteMatrix(inputImage);
            int threshold = CImageUtil.otsu(slika);
            return CImageUtil.matrixToBinary(slika, (byte)threshold);
        }
    }
}
